import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import {
  TrackCreateDto,
} from './track.dto';
import { TrackModel } from './track.model';

@Injectable()
export class TrackService {
  constructor(
    @InjectRepository(TrackModel)
    private readonly trackModelRepository: Repository<TrackModel>,
  ) {}

  create(body: TrackCreateDto) {
    this.trackModelRepository.save({
      ...body,
    });
  }
}
